package com.xianggg.xservers.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@RestController
public class HelloController {
    @RequestMapping({"","/"})
    public String hello(HttpServletRequest  request, HttpServletResponse response) throws ServletException, IOException {
        request.getRequestDispatcher("/static/index.html").forward(request, response);
        return "ddd";
    }
}
